package com.chance.cc.crawler.prod.command.trigger.domain.commerce.mogu;

import com.chance.cc.crawler.core.CrawlerJob;
import com.chance.cc.crawler.meta.core.bean.CrawlerMetaConstant;
import com.chance.cc.crawler.prod.command.job.domain.commerce.mogu.realtime.MoguArticleCrawlerScheduleJob;
import com.chance.cc.crawler.prod.command.job.domain.commerce.mogu.realtime.MoguArticleUrlCrawlerScheduleJob;
import com.chance.cc.crawler.prod.command.job.domain.commerce.mogu.realtime.MoguCommentCrawlerScheduleJob;
import com.chance.cc.crawler.prod.command.trigger.CommonCrawlerSchedulerTrigger;

/**
 * @ClassName mogu
 * @Description TODO
 * @Author songding
 * @Date 2021/10/20 14:16
 * @Version 1.0
 **/
public class MoguCommonCrawlerScheduleTrigger extends CommonCrawlerSchedulerTrigger {
    public static void main(String[] args) {
        //蘑菇街评论
      //  publishMoguCommentScheduleTriggerInfo();
        //蘑菇街文章
      //  publishMoguArticleScheduleTriggerInfo();
        //蘑菇街文章每月采集一次全品链接
        publishMoguArticleUrlScheduleTriggerInfo();
    }
    public static void publishMoguCommentScheduleTriggerInfo(){
        CrawlerJob crawlerJob = MoguCommentCrawlerScheduleJob.moguCrawlerJob();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                MoguCommentCrawlerScheduleJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                //CrawlerMetaConstant.ScheduleJobTrigger_Simple,
                "0 10 6 * * ?",
                //"",
                "蘑菇评论每天凌晨6：10点采集一次");
    }

    public static void publishMoguArticleScheduleTriggerInfo(){
        CrawlerJob crawlerJob = MoguArticleCrawlerScheduleJob.moguCrawlerJob();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                MoguArticleCrawlerScheduleJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                //CrawlerMetaConstant.ScheduleJobTrigger_Simple,
                "0 10 14 * * ?",
                //"",
                "蘑菇文章每天14：10点采集一次");
    }
    public static void publishMoguArticleUrlScheduleTriggerInfo(){
        CrawlerJob crawlerJob = MoguArticleUrlCrawlerScheduleJob.moguCrawlerJob();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                MoguArticleUrlCrawlerScheduleJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                //CrawlerMetaConstant.ScheduleJobTrigger_Simple,
                "0 0 1 27 * ?",
                //"",
                "蘑菇文章每月采集一次全品链接");
    }

}
